package com.ruoyi.business.service.impl;

import java.util.List;
import com.ruoyi.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.business.mapper.PersonalGroupBusinessComponentRelaMapper;
import com.ruoyi.business.domain.PersonalGroupBusinessComponentRela;
import com.ruoyi.business.service.IPersonalGroupBusinessComponentRelaService;

/**
 * 个性化组和业务组件关系表Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-09-02
 */
@Service
public class PersonalGroupBusinessComponentRelaServiceImpl implements IPersonalGroupBusinessComponentRelaService 
{
    @Autowired
    private PersonalGroupBusinessComponentRelaMapper personalGroupBusinessComponentRelaMapper;

    /**
     * 查询个性化组和业务组件关系表
     * 
     * @param id 个性化组和业务组件关系表主键
     * @return 个性化组和业务组件关系表
     */
    @Override
    public PersonalGroupBusinessComponentRela selectPersonalGroupBusinessComponentRelaById(Long id)
    {
        return personalGroupBusinessComponentRelaMapper.selectPersonalGroupBusinessComponentRelaById(id);
    }

    /**
     * 查询个性化组和业务组件关系表列表
     * 
     * @param personalGroupBusinessComponentRela 个性化组和业务组件关系表
     * @return 个性化组和业务组件关系表
     */
    @Override
    public List<PersonalGroupBusinessComponentRela> selectPersonalGroupBusinessComponentRelaList(PersonalGroupBusinessComponentRela personalGroupBusinessComponentRela)
    {
        return personalGroupBusinessComponentRelaMapper.selectPersonalGroupBusinessComponentRelaList(personalGroupBusinessComponentRela);
    }

    /**
     * 新增个性化组和业务组件关系表
     * 
     * @param personalGroupBusinessComponentRela 个性化组和业务组件关系表
     * @return 结果
     */
    @Override
    public int insertPersonalGroupBusinessComponentRela(PersonalGroupBusinessComponentRela personalGroupBusinessComponentRela)
    {
        personalGroupBusinessComponentRela.setCreateTime(DateUtils.getNowDate());
        return personalGroupBusinessComponentRelaMapper.insertPersonalGroupBusinessComponentRela(personalGroupBusinessComponentRela);
    }

    /**
     * 修改个性化组和业务组件关系表
     * 
     * @param personalGroupBusinessComponentRela 个性化组和业务组件关系表
     * @return 结果
     */
    @Override
    public int updatePersonalGroupBusinessComponentRela(PersonalGroupBusinessComponentRela personalGroupBusinessComponentRela)
    {
        personalGroupBusinessComponentRela.setUpdateTime(DateUtils.getNowDate());
        return personalGroupBusinessComponentRelaMapper.updatePersonalGroupBusinessComponentRela(personalGroupBusinessComponentRela);
    }

    /**
     * 批量删除个性化组和业务组件关系表
     * 
     * @param ids 需要删除的个性化组和业务组件关系表主键
     * @return 结果
     */
    @Override
    public int deletePersonalGroupBusinessComponentRelaByIds(Long[] ids)
    {
        return personalGroupBusinessComponentRelaMapper.deletePersonalGroupBusinessComponentRelaByIds(ids);
    }

    /**
     * 删除个性化组和业务组件关系表信息
     * 
     * @param id 个性化组和业务组件关系表主键
     * @return 结果
     */
    @Override
    public int deletePersonalGroupBusinessComponentRelaById(Long id)
    {
        return personalGroupBusinessComponentRelaMapper.deletePersonalGroupBusinessComponentRelaById(id);
    }
}
